home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / amac41.zip / RFR003.QM < prev    next >
Text File  |  1991-08-26  |  34KB  |  675 lines

  1. *                               RFR003.QM
  2. *                        Written By Tom Hogshead
  3. *                       [ See RFRMxx.QM For Use ]
  4. *                                 8/9/91
  5. *  Key       Subfile                       Description
  6. * =====  ===============  ====================================================
  7. * @(1)                  Formats Commented or Uncommented Paragraph,
  8. *                           Leaves: Commented Paragraph Uncommented, or
  9. *                                   Uncommented Paragraph Commented,
  10. *
  11. * @(2)                  Formats Commented or Uncommented Paragraph,
  12. *                           Leaves: Paragraph Commenting 'As Is'
  13. *
  14. * @(3)        < best >  Formats Commented or Uncommented Paragraph,
  15. *                           Leaves: Commented Paragraph Uncommented, or
  16. *                                   Uncommented Paragraph Commented,
  17. *                           Replaces "period space" with "period two spaces"
  18. *
  19. * @(4)                  Formats Commented or Uncommented Paragraph,
  20. *                           Leaves:  Paragraph Commenting 'as is'
  21. *                           Replaces "period space" with "period two spaces"
  22. *
  23. * @(5)                  Removes "period two spaces" from Paragraph
  24. *
  25. * ^(F3__)                 Formats PARAGRAPH (Fast And Small)
  26. * ^(F4__)                 Formats PARAGRAPH (Slow)
  27. * ^(F5__)                 Formats DOCUMENT
  28. * ^(F6__)                 Formats BLOCK.  Must Position Cursor At Block Begin
  29. * ^(F7__)                 Formats Message Reader Paragraph     (Tim Farley)
  30. * ^(F8__)                 Formats QMAC Txtfile BLOCK With Asterisks In Col 1
  31. *
  32. *          {e:\up\RFRM*}--Return To RFRMxx.QM
  33. *
  34. *-- eoi
  35.  
  36. * 
  37. * ┌─────────────────────────────────────────────────────────────────────┐
  38. * │^(F3__) Formats a paragraph.  (Macro has been around a long time)    │
  39. * └─────────────────────────────────────────────────────────────────────┘
  40. *
  41. ^F3 Macrobegin
  42.         Cursordown                      * move down one line
  43.         Prevpara                        * get to beginning of paragraph
  44.         Wrappara                        * reformat
  45.         Nextpara                        * go to begin next paragraph
  46. *
  47. * 8 bytes Wed  08-01-1990  10:47:36
  48. * 8 bytes Thu  08-08-1991  14:02:17 (TH ^F3, in rfr003.qm)
  49.  
  50. * 
  51. * ┌─────────────────────────────────────────────────────────────────────┐
  52. * │^(F4__) Formats Paragraph Only.  Keeps in original indented position │
  53. * └─────────────────────────────────────────────────────────────────────┘
  54.  
  55. * To run, place cursor line anywhere in a paragraph, and press ^F4.
  56. * This macro yields the same formatted paragraph as does ^F3 if
  57. * the right margin is set to 69 in the QEdit menu or in QCONFIG.DAT.
  58. * If there are asterisks in column 1 they are also formatted as part of
  59. * the paragraph.
  60.  
  61. ^F4 Macrobegin
  62.         Unmarkblock                     * Get ready
  63.         Cursordown                      * Get into paragraph
  64.         Prevpara                        * Get to paragraph begin
  65.         Markcolumn                      * Mark column
  66.         Endpara                         * Get to paragraph end
  67.         Gotocolumn "512" Return         * Get all paragraph in block
  68.         Markcolumn                      * Mark paragraph
  69.         Gotoblockbeg                    * Get to paragraph begin
  70.  JFalse END:                            * No block? End
  71.         Cut                             * Get into scrap
  72.         Editfile "C:$" Return           * Load C:$ (temp file)
  73.         Paste                           * Paste block to C:$
  74.         Setrmargin "69" Return **       * Set rt margin to 69
  75.                                         ** change "69" as needed
  76.         Wrappara                        * Format block
  77.         Setrmargin "80" Return          * Set rt margin to 80
  78.         Begfile                         * Get to block begin
  79.         Markcolumn                      * Mark
  80.         Endfile                         * Mark end block
  81.         Gotocolumn "69" Return **       * Get all block marked
  82.                                         ** change "69" as needed
  83.         Copy                            * Get formatted block to scrap
  84.         Killfile Quit                   * Kill/quit C:$
  85.         Paste                           * Put back formatted, marked
  86.         Begline
  87.         Makectrofscreen                 * Better view
  88.  END:
  89. *
  90. * 60 bytes Tue  09-11-1990  19:12:08
  91.  
  92.  
  93. ***************************** (TEST1) PARAGRAPH ******************************
  94. *       (remove * in column 1 before testing)
  95. *
  96. *       This is a (test) paragraph.
  97. *                Place the cursor line anywhere in this paragraph to run.
  98. *                Press ^F4 at the same time.
  99. *                Be sure AutoIndent is ON.  (Long line for test )==>>>>>>>>>>>> ***************************************** ***************************************** ***************************************** ***************************************** ***************************************** *****************************************
  100.  
  101. * 
  102. * ┌─────────────────────────────────────────────────────────────────────┐
  103. * │^(F5__) Formats complete document with blank lines forming paragraphs│
  104. * └─────────────────────────────────────────────────────────────────────┘
  105. *
  106. ^F5 MacroBegin
  107.         Unmarkblock                     * Unmark
  108.         Begfile                         * Get to file begin
  109.         Setrmargin "69" Return          * Set new right margin
  110.    FORMAT:                              *
  111.    Jfalse FINISH:                       * No more para? go to FINISH
  112.         WrapPara                        * Reformat
  113.         NextPara                        * Get to begin next paragraph
  114.    Jump FORMAT:                         *
  115.    FINISH:                              * No more paragraphs
  116.         Setrmargin "80" Return          * Reset right margin
  117. *
  118. * 26 bytes Wed  09-12-1990  16:47:
  119.  
  120. * 
  121. * ┌─────────────────────────────────────────────────────────────────────┐
  122. * │^(F6__) Formats Block.  Must position cursor at beginning of block   │
  123. * └─────────────────────────────────────────────────────────────────────┘
  124. * To run, position the 'cursor' at the beginning of the block to
  125. * reformat.  Press ^F6, then cursor down to bottom of block to
  126. * reformat.  Press 'Enter' when the block is marked.  This macro differs
  127. * from ^F8 in that the starting position of the block to be
  128. * reformatted is selected by the starting position of the cursor; in
  129. * ^F8 the block starting POSITION is selected by the starting
  130. * position of the cursor line.
  131.  
  132. *
  133. ^F6 Macrobegin
  134.         Unmarkblock                     * Get ready
  135.         Gotocolumn "512" Return         * Get all block to format
  136.         Markcolumn                      * Mark begin of block
  137.         Prevposition                    *
  138.         Begline                         *
  139.         Prevposition                    *
  140.         Makectrofscreen                 * See better
  141.         Cursordown                      * Position to cursor down
  142.         Pause                           * Cursor to end, then 'Enter'
  143.         Markcolumn                      * Mark end of block
  144.         Gotoblockbeg                    * Get to block begin
  145.  JFalse END:                            * No block? End
  146.         Cut                             * Get into scrap
  147.         Editfile "C:$" Return           * Load C:$ (temp file)
  148.         Paste                           * Paste block to C:$
  149.         Setrmargin "69" Return **       * Set rt margin to 69
  150.                                         ** change "69" as needed
  151.         Wrappara                        * Format block
  152.         Setrmargin "80" Return          * Reset rt margin to 80
  153.         Begfile                         * Get to block begin
  154.         Markcolumn                      * Mark
  155.         Endfile                         * Mark endblock
  156.         Gotocolumn "69" Return **       * Get all block marked
  157.                                         ** change "69" as needed
  158.         Copy                            * Get formatted block to scrap
  159.         Killfile Quit                   * Kill/quit C:$
  160.         Pasteover                       * Put back formatted, marked
  161.         Makectrofscreen                 * Better view
  162.  END:
  163. *
  164. * 62 bytes Tue  09-11-1990  19:09:31
  165.  
  166. ***************************** (TEST2) PARAGRAPH ***************************
  167.  
  168. *        This is a test block.  To format, place the "cursor" on "T" in
  169. *               in "this" on line 1.  Then press ^F6 and cursor down to
  170. *               block end.  When the block has been marked press
  171. *               'Enter'.
  172. *               Asterisks need not be removed.
  173.  
  174. * 
  175. *┌───────────────────────────────────────┐
  176. *│^(F7__) Format Message Reader Paragraph│
  177. *└───────────────────────────────────────┘
  178. * Here's a handy macro from Tim Farley of SemWare to reformat a message
  179. * reader paragraph.  Remember, paragraphs are reformatted to the width
  180. * of the right margin setting, so set as needed.
  181. *
  182. * =========================================================================
  183. * Date: 10-01-90 (19:09)           Number: 3041         SemWare Support BBS
  184. *   To: DAN SNAPPER                Refer#: 3028
  185. * From: TIM FARLEY                   Read: YES
  186. * Subj: Message reformat macro       Conf: (21) ILink
  187. * ------------------------------------------------------------------------
  188. * DS>   Does anyone have a macro to reformat a quoted 'off-line'
  189. * DS>   message paragraph and then reinsert the quotes back?
  190. * DS>
  191. * DS>
  192. * DS>
  193. *
  194. * Here it is:
  195. *
  196. *
  197. * Reader Paragraph Reform
  198. *   Mark a line block, hit this key, and it will reform the text, leaving
  199. *   all "II>" quoting on the left alone.
  200. *
  201. *   Assumes that ">" is the last character of the "quoting" mark.
  202. *   Also assumes that WordWrap is currently on when you hit it,
  203. *   and that there is a currently marked block.
  204. *
  205.  
  206. ^F7  MacroBegin OneWindow
  207.      GotoBlockBeg GotoBlockEnd JTrue doit: MarkLine GotoBlockEnd
  208.    doit:
  209.      ToggleWordWrap EndLine #254 ToggleWordWrap
  210.      GotoBlockBeg GotoColumn "16" Return Find ">" Return "BL" Return
  211.      JTrue foundit:
  212.      BegLine
  213.    foundit:
  214.      CursorRight
  215.      UnmarkBlock MarkColumn Find #254 Return "N" Return
  216.      GotoColumn "512" Return MarkColumn BegLine GotoBlockBeg
  217.      Cut
  218.      MarkLine CopyBlock CopyBlock CopyBlock UnmarkBlock
  219.      HorizontalWindow EditFile "$$$$$$$$.tmp" Return
  220.      BegFile BegLine         * Top of files in case it was already here
  221.      InsertLine InsertLine   * ??
  222.      Paste UnMarkBlock       * put block in place
  223.      EndFile AddLine BegFile * mandatory blank line on end
  224.    more:
  225.      WrapPara                * wrap each para
  226.      JTrue more:             * until none left
  227.      DelLine
  228.      BegFile BegLine
  229.      Find Return Return      * find our goofy char again
  230.      DelCh                   * and delete it
  231.      GotoColumn "512" Return MarkColumn BegFile BegLine MarkColumn
  232.      Cut Quit PrevWindow OneWindow
  233.      Paste GotoBlockEnd CursorDown BegLine UnMarkBlock
  234. *
  235. * 132 bytes Tue  10-02-1990  16:51:06 (added TH)
  236.  
  237. * This macro is too long for QCONFIG, you'll have to use QMAC to
  238. * compile it.  Then put the compiled macro files in some directory,
  239. * and add the following option to the command line your reader runs
  240. * QEdit with:
  241. *
  242. *      /Ld:\dir\filename.ext
  243. *
  244. * where D:\DIR\FILENAME.EXT is the full drive, path, and name of
  245. * the compiled binary macro file.
  246. *
  247. * I've used this macro myself to reformat quotes, for over a year
  248. * now.
  249. *
  250. * --Tim Farley
  251. *   SemWare Technical Support
  252.  
  253. * 
  254. * ┌─────────────────────────────────────────────────────────────────────┐
  255. * │^(F8__) Formats QMAC txtfile block with asterisk in column 1         │
  256. * └─────────────────────────────────────────────────────────────────────┘
  257.  
  258. * This macro is included for technique only, since @1 does the same
  259. * thing, and is smaller and faster.
  260.  
  261. * To run, position the 'cursor line' on the first line of the block to
  262. * reformat.  Press ^F8, then cursor down to bottom of block to
  263. * reformat.  To reformat, press 'Enter' when the block is marked.  This
  264. * macro differs from ^F6 in that the block does not include the
  265. * asterisk and blank space; in ^F6 the block starting position is
  266. * selected by the starting position of the cursor line.  This macro
  267. * also differs from ^F4 which formats a paragraph from first blank line
  268. * which has no text or asterisk on line to last blank line.
  269.  
  270.  
  271. ^F8 Macrobegin
  272.         Unmarkblock                     * Get ready
  273.         Gotocolumn "512" Return         * Get all block to format
  274.         Markcolumn                      * Mark begin of block
  275.                 Begline                 * Start at line begin
  276.                 Wordright               * Get to first word on line
  277.         Cursordown                      * Position to cursor down
  278.         Makectrofscreen                 * See better
  279.         Pause                           * Cursor to end, then 'Enter'
  280.         Markcolumn                      * Mark end of block
  281.         Gotoblockbeg                    * Get to block begin
  282.  JFalse END:                            * No block? End
  283.         Cut                             * Get into scrap
  284.         Editfile "C:$" Return           * Load C:$ (temp file)
  285.         Paste                           * Paste block to C:$
  286.         Setrmargin "69" Return **       * Set rt margin to 69
  287.                                         ** change "69" as needed
  288.         Wrappara                        * Format block
  289.         Setrmargin "80" Return          * Reset rt margin to 80
  290.         Begfile                         * Get to block begin
  291.         Markcolumn                      * Mark
  292.         Endfile                         * Mark endblock
  293.         Gotocolumn "69" Return **       * Get all block marked
  294.                                         ** change "65" as needed
  295.         Copy                            * Get formatted block to scrap
  296.         Killfile Quit                   * Kill/quit C:$
  297.         Pasteover                       * Put back formatted, marked
  298.         Makectrofscreen                 * Better view
  299.  END:
  300. *
  301. * 61 bytes Tue  09-11-1990  19:21:48
  302.  
  303.  
  304.  
  305. * 
  306. * ----------------------------------------------------------------------
  307. * @(1)  Formats Commented or Uncommented Paragraph,
  308. *       Leaves Commented Paragraph Uncommented,
  309. *       Leaves Uncommented Paragraph Commented,
  310. * ----------------------------------------------------------------------
  311.  
  312. * This macro formats a paragraph that is either commented with an
  313. * asterisk and space in column 1, or uncommented, to a column width of
  314. * 69.  If the paragraph is already commented, it is formatted and
  315. * uncommented: if the paragraph is *not* already commented, it is
  316. * formatted and commented.  Invoking this macro twice will return the
  317. * paragraph to it's original commented or uncommented state, but
  318. * formatted.  This macro will not work correctly if blank lines are
  319. * commented.
  320.  
  321. * To run, invoke @1 with the cursor located anywhere in a paragraph. If
  322. * the cursor is located between paragraphs, the previous paragraph is
  323. * formatted.  After this macro ends, the cursor is returned to the
  324. * beginning of the formatted paragraph.  The user may insert 'nextpara'
  325. * at the end of the macro to return the cursor to the beginning of the
  326. * next paragraph after macro execution.  This macro will fit on one
  327. * line of QConfig.dat.
  328.  
  329. @1 macrobegin
  330.         unmarkblock               *
  331.         setrmargin "69" return    * Set right margin to 69
  332.         Cursordown                * Move down one line
  333.         Prevpara                  * Go to beginning of paragraph
  334.         markcharacter             * Start character block
  335.         endpara                   *
  336.         markcharacter             * Close para as character block
  337.         PrevPosition              * Return to paragraph begin
  338. * --------------- Check if paragraph already commented --------------*
  339.         CursorRight               * Move to col 2
  340.         Find "*" Return           * See if line is already commented
  341.         "LB" Return               *(assumes all para commented or not)
  342.         Jfalse COMMENT:           * If no star in col 1, must comment
  343. * ------------------ Uncomment And Format Paragraph ------------------*
  344.  UNCOMMENT:                       *ELSE para is commented
  345.         ShiftLeft ShiftLeft       * Col 1 has star, un-comment para
  346.         wrappara                  * Format uncommented paragraph
  347.         prevpara                  * Return to begin of formatted para
  348.         Jump END:                 * End macro
  349. * ------------------- Comment And Format Paragraph -------------------*
  350.  COMMENT:                         *
  351.         wrappara                  * Format uncommented paragraph
  352.         gotoblockend              * Go to paragraph end
  353.         ShiftRight ShiftRight     * Shift all lines to right twice
  354.         BegLine                   * Move cursor to col 1
  355.         unmarkblock               * Unmark
  356.         MarkColumn                * Mark 1st character column
  357.         cursordown                * Needed for single line case
  358.         prevpara                  * Move to begin of shftd/frmtd para
  359.         begline                   * Move cursor to col 1
  360. *       MarkColumn                * Mark 1st character column             |a
  361.         FillBlock '*' Return      * Fill col 1 with '*'
  362.  END:                             *
  363.         makectrofscreen           * Position para begin on screen center  |a
  364. *       maketopofscreen           * Position para begin on screen top     |
  365.         UnmarkBlock               * Unmark
  366. *       scrollup                  * scrollup 2 lines                      |a
  367. *       scrollup                  *                                       |
  368. *       nextpara                  * Position at start of next paragraph
  369. *
  370. * 56 bytes Thu  08-15-1991  19:35:22 (TH @1 |a)
  371. * 53 bytes Thu  08-08-1991  13:50:57 (TH @1, in rfr003.qm)
  372.  
  373.  
  374. * Uncomment and format to one line for QCconfig.dat:
  375. * --------------------------------------------------
  376. * @1      Macro_Begin UnmarkBlock SetRmargin "69" Return CursorDown
  377. *         PrevPara MarkCharacter EndPara MarkCharacter PrevPosition
  378. *         CursorRight Find "*" Return "LB" Return JFalse Label0:
  379. *         ShiftLeft ShiftLeft WrapPara PrevPara Jump Label1: Label0:
  380. *         WrapPara GotoBlockEnd ShiftRight ShiftRight BegLine
  381. *         UnmarkBlock MarkColumn CursorDown PrevPara BegLine FillBlock
  382. *         "*" Return Label1: MakeCtrOfScreen UnmarkBlock
  383. * *
  384. * * 53 bytes Thu  08-08-1991  13:50:57 (TH @1, in rfr003.qm)
  385.  
  386.  
  387. * 
  388. * ----------------------------------------------------------------------
  389. * @(2)  Formats Commented or Uncommented Paragraph,
  390. *       Leaves Paragraph In Original Commented Or Uncommented State
  391. * ----------------------------------------------------------------------
  392.  
  393. * This macro formats a paragraph that is either commented with an
  394. * asterisk and space in column 1 or uncommented, to a column width of
  395. * 69.  This macro differs from @1 in that @2 does not change the
  396. * commented state of the paragraph, i.e.  it leaves a commented
  397. * paragraph commented after reformatting and an uncommented paragraph
  398. * uncommented, but formatted.  This macro will not work correctly if
  399. * blank lines are commented.
  400.  
  401. * To run, invoke @2 with the cursor located anywhere in the paragraph.
  402. * If the cursor is located between paragraphs, the previous paragraph
  403. * is formatted.  After this macro ends, the cursor is returned to the
  404. * beginning of the formatted paragraph.  The user may insert 'nextpara'
  405. * at the end of the macro to return the cursor to the beginning of the
  406. * next paragraph after macro execution.  This macro will fit on one
  407. * line of QConfig.dat.
  408.  
  409. @2 macrobegin
  410.         unmarkblock               *
  411.         setrmargin "69" return    * Set right margin to 69
  412.         Cursordown                * Move down one line
  413.         Prevpara                  * Go to beginning of paragraph
  414.         markcharacter             * Start character block
  415.         endpara                   *
  416.         markcharacter             * Close para as character block
  417.         PrevPosition              * Return to paragraph begin
  418. * --------------- Check if paragraph already commented --------------*
  419.         CursorRight               * Move to col 2
  420.         Find "*" Return           * See if line is already commented
  421.         "LB" Return               *(assumes all para commented or not)
  422.         Jtrue UNCOMMENT:          * If star in col 1, must uncomment
  423. * ------------------- Format Uncommented Paragraph -------------------*
  424.         wrappara                  * Format uncommented paragraph
  425.         Prevpara                  * Go to beginning of paragraph
  426.         Jump END:                 * End macro
  427. * ------------------ Uncomment And Format Paragraph ------------------*
  428.  UNCOMMENT:                       *
  429.         ShiftLeft ShiftLeft       * Col 1 has star, un-comment block
  430.         wrappara                  * Format uncommented paragraph
  431. * ----------------------- Re-comment Paragraph -----------------------*
  432.         gotoblockend              * Go to paragraph end
  433.         ShiftRight ShiftRight     * Shift all lines to right twice
  434.         BegLine                   * Move cursor to col 1
  435.         unmarkblock               * Unmark
  436.         MarkColumn                * Mark 1st character column
  437.         cursordown                * Needed for single line case
  438.         prevpara                  * Move to begin of shftd/frmtd para
  439.         begline                   * Move cursor to col 1
  440.         FillBlock '*' Return      * Fill col 1 with '*'
  441.  END:                             *
  442.         makectrofscreen           * Position para begin on screen center
  443.         UnmarkBlock               * Unmark
  444. *       nextpara                  * Position at start of next paragraph
  445. *
  446. * 53 bytes Thu  08-08-1991  13:38:59 (TH @2, in rfr003.qm)
  447.  
  448. * Uncomment and format to one line for QCconfig.dat:
  449. * --------------------------------------------------
  450. * @2      Macro_Begin UnmarkBlock SetRmargin "69" Return CursorDown
  451. *         PrevPara MarkCharacter EndPara MarkCharacter PrevPosition
  452. *         CursorRight Find "*" Return "LB" Return JTrue Label0:
  453. *         WrapPara PrevPara Jump Label1: Label0: ShiftLeft ShiftLeft
  454. *         WrapPara GotoBlockEnd ShiftRight ShiftRight BegLine
  455. *         UnmarkBlock MarkColumn CursorDown PrevPara BegLine FillBlock
  456. *         "*" Return Label1: MakeCtrOfScreen UnmarkBlock
  457. * *
  458. * * 53 bytes Thu  08-08-1991  13:38:59 (TH @2, in rfr003.qm)
  459.  
  460. * 
  461. * ----------------------------------------------------------------------
  462. * @(3)  Formats Commented or Uncommented Paragraph,
  463. *       Leaves: Commented Paragraph Uncommented, or
  464. *               Uncommented Paragraph Commented,
  465. *       Replaces "period space" with "period two spaces"
  466. * ----------------------------------------------------------------------
  467.  
  468. * This macro formats a paragraph to a column width of 69.  Before macro
  469. * execution the paragraph may either be commented with an asterisk and
  470. * space in column 1 or uncommented.  All occurrences in the paragraph
  471. * of "period space" are replaced with "period two spaces".  If the
  472. * paragraph is already commented before macro execution, it is
  473. * formatted and uncommented.  If the paragraph is not already
  474. * commented, it is formatted and commented.  Invoking this macro twice
  475. * will return the paragraph to it's original commented or uncommented
  476. * state, but formatted.  This macro will not work correctly if blank
  477. * lines are commented.
  478.  
  479. * To run, invoke @3 with the cursor located anywhere in a paragraph.  If
  480. * the cursor is located between paragraphs, the previous paragraph is
  481. * formatted.  After this macro ends, the cursor is returned to the
  482. * beginning of the formatted paragraph.  The user may insert 'nextpara'
  483. * at the end of the macro to return the cursor to the beginning of the
  484. * next paragraph after macro execution.  This macro will fit on one
  485. * line of QConfig.dat by removing 'Label' from the QMAC compiled macro
  486. * as shown below.  Period spacing routine was written by Tim Farley.
  487.  
  488.  
  489. @3 macrobegin
  490.         unmarkblock               *
  491.         setrmargin "69" return    * Set right margin to 69
  492.         Cursordown                * Move down one line
  493.         Prevpara                  * Go to beginning of paragraph
  494.         markcharacter             * Start character block
  495.         endpara                   *
  496.         markcharacter             * Close para as character block
  497.         PrevPosition              * Return to paragraph begin
  498. * --------------- Check if paragraph already commented --------------*
  499.         CursorRight               * Move to col 2
  500.         Find "*" Return           * See if line is already commented
  501.         "LB" Return               *(assumes all para commented or not)
  502.         Jfalse COMMENT:           * If no star in col 1, must comment
  503. * ------------------ Uncomment And Format Paragraph ------------------*
  504.  UNCOMMENT:                       *ELSE para is commented
  505.         ShiftLeft ShiftLeft       * Col 1 has star, un-comment para
  506.         wrappara                  * Format uncommented paragraph
  507.         prevpara                  * Return to begin of formatted para
  508.         Jump END:                 * End macro
  509. * ------------------- Comment And Format Paragraph -------------------*
  510.  COMMENT:                         *
  511.         wrappara                  * Format uncommented paragraph
  512.         gotoblockend              * Go to paragraph end
  513.         ShiftRight ShiftRight     * Shift all lines to right twice
  514.         BegLine                   * Move cursor to col 1
  515.         unmarkblock               * Unmark
  516.         MarkColumn                * Mark 1st character column
  517.         cursordown                * Needed for single line case
  518.         prevpara                  * Move to begin of shftd/frmtd para
  519.         begline                   * Move cursor to col 1
  520.         FillBlock '*' Return      * Fill col 1 with '*'
  521.         markline                  * Make paragraph a line block
  522.  END:                             *
  523. * -------- Replaces "Period Space" With "Period two spaces" --------*
  524.         makectrofscreen           * Position para begin on screen center
  525.         FindReplace               *
  526.             ". "   Return         * Change period with single space
  527.             ".  "  Return         * to one with double space.
  528.             "LN"   Return         *
  529.  JFalse DONE:                     * None?  We're done...
  530.         FindReplace               *
  531.             ".   " Return         * Now fix any that ended up with 3
  532.             ".  "  Return         * to have just two again.
  533.             "LN"   Return         *
  534.  DONE:                            *
  535.         UnmarkBlock               * Unmark
  536. *       nextpara                  * Position at start of next paragraph
  537. *
  538. * 97 bytes Thu  08-08-1991  14:03:38 (TH @3, in rfr003.qm)
  539.  
  540.  
  541. * QMAC compiled @3 with "Label" removed to fit on one line of QConfig.dat
  542. * -----------------------------------------------------------------------
  543.  
  544. * @3      Macro_Begin UnmarkBlock SetRmargin "69" Return CursorDown
  545. *         PrevPara MarkCharacter EndPara MarkCharacter PrevPosition
  546. *         CursorRight Find "*" Return "LB" Return JFalse 0:
  547. *         ShiftLeft ShiftLeft WrapPara PrevPara Jump 1: 0:
  548. *         WrapPara GotoBlockEnd ShiftRight ShiftRight BegLine
  549. *         UnmarkBlock MarkColumn CursorDown PrevPara BegLine FillBlock
  550. *         "*" Return MarkLine 1: MakeCtrOfScreen FindReplace ". "
  551. *         Return ".  " Return "LN" Return JFalse 2: FindReplace ""
  552. *         ".   " Return ".  " Return "LN" Return 2: UnmarkBlock
  553. * *
  554. * * 97 bytes Thu  08-08-1991  14:03:38 (TH @3, in rfr003.qm)
  555.  
  556. * 
  557. * ----------------------------------------------------------------------
  558. * @(4)  Formats Commented or Uncommented Paragraph,
  559. *       Leaves Paragraph In Original Commented Or Uncommented State
  560. *       Replaces "period space" With "period two spaces"
  561. * ----------------------------------------------------------------------
  562.  
  563. * This macro formats a paragraph that is either commented with an
  564. * asterisk and space in column 1 or uncommented, to a column width of
  565. * 69, and replaces "period space" with "period two spaces".  This
  566. * macro differs from @3 in that @4 does not change the commented state
  567. * of the paragraph, i.e.  it leaves a commented paragraph commented
  568. * after reformatting and an uncommented paragraph uncommented, but
  569. * formatted.  This macro will not work correctly if blank lines are
  570. * commented.
  571.  
  572. * To run, invoke @4 with the cursor located anywhere in the paragraph.
  573. * If the cursor is located between paragraphs, the previous paragraph
  574. * is formatted.  After this macro ends, the cursor is returned to the
  575. * beginning of the formatted paragraph.  The user may insert 'nextpara'
  576. * at the end of the macro to return the cursor to the beginning of the
  577. * next paragraph after macro execution.  This macro will fit on one
  578. * line of QConfig.dat by removing 'Label' from the QMAC compiled macro
  579. * as shown below.  Period spacing routine was written by Tim Farley.
  580.  
  581. @4 macrobegin
  582.         unmarkblock               *
  583.         setrmargin "69" return    * Set right margin to 69
  584.         Cursordown                * Move down one line
  585.         Prevpara                  * Go to beginning of paragraph
  586.         markcharacter             * Start character block
  587.         endpara                   *
  588.         markcharacter             * Close para as character block
  589.         PrevPosition              * Return to paragraph begin
  590. * --------------- Check if paragraph already commented --------------*
  591.         CursorRight               * Move to col 2
  592.         Find "*" Return           * See if line is already commented
  593.         "LB" Return               *(assumes all para commented or not)
  594.         Jtrue UNCOMMENT:          * If star in col 1, must uncomment
  595. * ------------------- Format Uncommented Paragraph -------------------*
  596.         wrappara                  * Format uncommented paragraph
  597.         Prevpara                  * Go to beginning of paragraph
  598.         Jump END:                 * End macro
  599. * ------------------ Uncomment And Format Paragraph ------------------*
  600.  UNCOMMENT:                       *
  601.         ShiftLeft ShiftLeft       * Col 1 has star, un-comment block
  602.         wrappara                  * Format uncommented paragraph
  603. * ----------------------- Re-comment Paragraph -----------------------*
  604.         gotoblockend              * Go to paragraph end
  605.         ShiftRight ShiftRight     * Shift all lines to right twice
  606.         BegLine                   * Move cursor to col 1
  607.         unmarkblock               * Unmark
  608.         MarkColumn                * Mark 1st character column
  609.         cursordown                * Needed for single line case
  610.         prevpara                  * Move to begin of shftd/frmtd para
  611.         begline                   * Move cursor to col 1
  612.         FillBlock '*' Return      * Fill col 1 with '*'
  613.         markline                  * Make paragraph a line block
  614.  END:                             *
  615. * -------- Replaces "Period Space" With "Period two spaces" --------*
  616.         makectrofscreen           * Position para begin on screen center
  617.         FindReplace               *
  618.             ". "   Return         * Change period with single space
  619.             ".  "  Return         * to one with double space.
  620.             "LN"   Return         *
  621.  JFalse DONE:                     * None?  We're done...
  622.         FindReplace               *
  623.             ".   " Return         * Now fix any that ended up with 3
  624.             ".  "  Return         * to have just two again.
  625.             "LN"   Return         *
  626.  DONE:                            *
  627.         UnmarkBlock               * Unmark
  628. *       nextpara                  * Position at start of next paragraph
  629. *
  630. * 97 bytes Thu  08-08-1991  14:24:28 (TH @4, in rfr003.qm)
  631.  
  632. * QMAC compiled @4 with "Label" removed to fit on one line of QConfig.dat
  633. * -----------------------------------------------------------------------
  634. * @4      Macro_Begin UnmarkBlock SetRmargin "69" Return CursorDown
  635. *         PrevPara MarkCharacter EndPara MarkCharacter PrevPosition
  636. *         CursorRight Find "*" Return "LB" Return JTrue 0:
  637. *         WrapPara PrevPara Jump 1: 0: ShiftLeft ShiftLeft
  638. *         WrapPara GotoBlockEnd ShiftRight ShiftRight BegLine
  639. *         UnmarkBlock MarkColumn CursorDown PrevPara BegLine FillBlock
  640. *         "*" Return MarkLine 1: MakeCtrOfScreen FindReplace ". "
  641. *         Return ".  " Return "LN" Return JFalse 2: FindReplace ""
  642. *         ".   " Return ".  " Return "LN" Return 2: UnmarkBlock
  643. * *
  644. * * 97 bytes Thu  08-08-1991  14:24:28 (TH @4, in rfr003.qm)
  645.  
  646.  
  647.  
  648. * 
  649. * ----------------------------------------------------------------------
  650. * @(5) Removes "period two spaces" From Paragraph
  651. * ----------------------------------------------------------------------
  652.  
  653. * This macro removes all occurrences of "period two spaces" in a
  654. * paragraph and returns to normal "period space".  Invoke @5 with the
  655. * cursor anywhere in a paragraph.
  656.  
  657. @5 Macrobegin
  658.         unmarkblock               *
  659.         Cursordown                * Move down one line
  660.         Prevpara                  * Go to beginning of paragraph
  661.         markcharacter             * Start character block
  662.         endpara                   *
  663.         markcharacter             * Close paragraph as character block
  664.         PrevPosition              * Return to paragraph begin
  665.         FindReplace               * Replace
  666.             ".  "   Return        *   period space
  667.             ". "    Return        *   with period two spaces
  668.             "LN"    Return        *   only in paragraph
  669.         Unmarkblock               *
  670.         Makectrofscreen           *
  671. *
  672. * 31 bytes Thu  08-08-1991  16:13:16 (TH @5, in rfr003.qm)
  673.  
  674.  
  675.